www.mxdraw.com
|
打碎块引用,被打碎的引用对象还在,打碎的实体是新生成的。
[helpstring("method Explode")] HRESULT Explode([out,retval] IMxDrawResbuf** newIds);
参数 |
说明 |
[out,retval] IMxDrawResbuf** newIds |
返回打碎后新生成的实体id数组 |
例如:在C#打碎块的代码
private void ExplodeBlock() { // 与用户交在图面上选择要打碎的块引对象 MxDrawUtility mxUtility = new MxDrawUtility(); object getPt; MxDrawEntity ent = mxUtility.GetEntity(out getPt,"n 选择图块:"); if (ent == null) { MessageBox.Show("没有选择实体.."); return; } if (ent is MxDrawBlockReference) { // 选择的是一个块对象,就调用打碎函数碎 MxDrawBlockReference blkRef = (MxDrawBlockReference)ent; MxDrawResbuf rb = (MxDrawResbuf)(blkRef.Explode() ); // 得到打碎后新生成的实体的id for(Int32 i = 1; i < rb.Count;i++) { long entId = rb.AtLong(i); } } }